﻿import { agent } from './Routes/agent';
import { appConfigure } from './Routes/appConfigure';
import { cabinet } from './Routes/cabinet';
import { company } from './Routes/company';
import { weChatstat } from './Routes/weChatstat';
import { delivery } from './Routes/delivery';
import { expressRoute } from './Routes/expressRoute';
import { download } from './Routes/download';
import { feedback } from './Routes/feedback';
import { health } from './Routes/health';
import { imei } from './Routes/imei';
import { jobs } from './Routes/jobs';
import { notice } from './Routes/notice';
import { num } from './Routes/num';
import { pickUpWhiteList } from './Routes/pickUpWhiteList';
import { postHouse } from './Routes/postHouse';
import { users } from './Routes/users';

export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: '登录',
            path: '/user/login',
            component: './user/Login',
          },
          {
            name: '找回密码',
            path: '/user/pwd',
            component: './user/ForgetPwd',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/index',
    name: '概览',
    icon: 'home',
    access: 'can_overview',
    component: './Index',
  },
  {
    path: '/order',
    name: '订单管理',
    icon: 'appstore',
    access: 'can_order',
    routes: delivery,
  },
  {
    path: '/BasicConfig',
    name: '基础配置',
    icon: 'setting',
    access: 'can_basicConfig',
    routes: [...postHouse, ...imei, ...cabinet, ...num, ...company, ...agent],
  },
  {
    path: '/BusinessConfig',
    name: '业务配置',
    icon: 'container',
    access: '',
    routes: [...pickUpWhiteList],
  },
  {
    path: '/OperationsMange',
    name: '运维管理',
    icon: 'barChart',
    access: 'can_operationsMange',
    routes: [...notice, ...feedback, ...health, ...expressRoute, ...download],
  },
  {
    path: '/System',
    name: '系统权限',
    icon: 'tool',
    access: 'canAdmin',
    routes: [...users, ...jobs, ...appConfigure],
  },
  {
    path: '/DateMange',
    name: '数据中心',
    icon: 'box-plot',
    access: 'appstore',
    routes: weChatstat,
  },
  {
    path: '/',
    redirect: '/Index',
  },
  {
    component: './404',
  },
];
